﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kooboo.IoC;

namespace Kooboo.Commerce.Contexts.Products
{
    public static class VistorBehavior
    {
        #region Product
        public static IQueryable<IProduct> QueryProducts(this IVistor actor)
        {
            return ContextContainer.Current.Resolve<IProductRepository>().Products;
        }
        #endregion

        #region ProductQuetion
        public static IQueryable<IProductQuestion> QueryProductQuetions(this IVistor actor)
        {
            return ContextContainer.Current.Resolve<IProductQuestionRepository>().ProductQuestions;
        } 
        #endregion

        #region ProductReview
        public static IQueryable<IProductReview> QueryProductReviews(this IVistor actor)
        {
            return ContextContainer.Current.Resolve<IProductReviewRepository>().ProductReviews;
        }
        #endregion
    }
}
